<template>
  <n-popover trigger="hover" :disabled="!attrs.tip" content-style="font-size:12px">
    <template #trigger>
      <n-button secondary strong size="tiny" v-bind="attrs">
        <icon :name="attrs.icon">
          <slot />
        </icon>
      </n-button>
    </template>
    <span>{{ attrs.tip }}</span>
  </n-popover>
</template>
<script lang="tsx" setup>
import { ButtonProps } from 'naive-ui';
import Icon from './icon.vue';
import { useAttrs } from 'vue';
const attrs: ButtonProps & { icon?: string, tip?: string } = useAttrs();
</script>